home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / prog_gen / t4diblib.zip / ANIMATE2.F4_ / ANIMATE2.F4
Text File  |  1995-12-11  |  3KB  |  103 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Appearance      =   0  'Flat
  4.    BackColor       =   &H80000005&
  5.    Caption         =   "ANIMATE2"
  6.    ClientHeight    =   1764
  7.    ClientLeft      =   2628
  8.    ClientTop       =   2688
  9.    ClientWidth     =   2868
  10.    BeginProperty Font 
  11.       name            =   "MS Sans Serif"
  12.       charset         =   1
  13.       weight          =   700
  14.       size            =   7.8
  15.       underline       =   0   'False
  16.       italic          =   0   'False
  17.       strikethrough   =   0   'False
  18.    EndProperty
  19.    ForeColor       =   &H80000008&
  20.    Height          =   2184
  21.    Left            =   2580
  22.    LinkTopic       =   "Form1"
  23.    ScaleHeight     =   1764
  24.    ScaleWidth      =   2868
  25.    Top             =   2316
  26.    Width           =   2964
  27.    Begin VBX.T4DILIB dilib1 
  28.       Caption         =   "dilib1"
  29.       ControlMode     =   0  'Lib -> PIC
  30.       Height          =   372
  31.       Left            =   1800
  32.       Top             =   1200
  33.       Visible         =   0   'False
  34.       Width           =   852
  35.    End
  36.    Begin VB.CommandButton Command1 
  37.       Appearance      =   0  'Flat
  38.       BackColor       =   &H80000005&
  39.       Caption         =   "&Quit"
  40.       Height          =   372
  41.       Left            =   120
  42.       TabIndex        =   0
  43.       Top             =   1200
  44.       Width           =   1452
  45.    End
  46. End
  47. Attribute VB_Name = "Form1"
  48. Attribute VB_Creatable = False
  49. Attribute VB_Exposed = False
  50. Option Explicit
  51. Private Declare Function GetFreeSpace& Lib "kernel" (ByVal x%)
  52. Dim TimeIn!
  53. Dim Frames%
  54.  
  55. Private Sub Command1_Click()
  56.  Terminate
  57. End Sub
  58.  
  59. Private Sub Form_Load()
  60. Dim loopctr%, memctr%, numberofmembers%
  61.  Top = (Screen.Height - Height) / 2!
  62.  Left = (Screen.Width - Width) / 2!
  63.  dilib1.LibraryName = "bluespin.ilb"
  64.  dilib1.Action = IM_ACTION_OPENLIBRARY
  65.  numberofmembers = dilib1.MemberCount
  66. 'Load all member names.
  67.  ReDim MemName(1 To numberofmembers) As String
  68.  For memctr = 1 To numberofmembers
  69.   dilib1.MemberNumber = memctr
  70.   MemName(memctr) = dilib1.MemberName
  71.  Next
  72.  Show
  73.  Frames = 0
  74.  TimeIn = Timer
  75.  For loopctr = 1 To 100
  76.   For memctr = 1 To UBound(MemName)
  77. 'Cycle through the name array.
  78.    dilib1.MemberName = MemName(memctr)
  79.    dilib1.Action = IM_ACTION_GETMEMBER
  80.    Picture = dilib1.Picture
  81.    Frames = Frames + 1
  82.   Next memctr
  83.   DoEvents
  84.  Next loopctr
  85.  Terminate
  86. End Sub
  87.  
  88. Private Sub Form_Unload(Cancel As Integer)
  89.  End
  90. End Sub
  91.  
  92. Private Sub Terminate()
  93. Dim TimeOut!, TimeElapsed!, fps!
  94.  TimeOut = Timer
  95.  TimeElapsed = TimeOut - TimeIn
  96.  fps = Frames
  97.  fps = Frames / TimeElapsed
  98.  MsgBox Trim$(Str$(fps)) + " frames per second."
  99.  End
  100. End Sub
  101.  
  102.  
  103.